﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class Clients_AceptPayments : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            sourceRequest.SelectParameters["from_account"].DefaultValue = Context.User.Identity.Name;

            Page.DataBind();
            if (GridView1.Rows.Count == 0) lbl_ZadnaHistorie.Visible = true; // najit lepši řešeni
        }
    }
    protected void Button1_Click(object sender, EventArgs e)
    {

    }


    public void RowCommand(Object sender, GridViewCommandEventArgs e)
    {
        string Id = (string)e.CommandArgument;

       if (e.CommandName == "Potvrdit")
       {
           PaymentManager.RequestPayment(Id, true);
       }
       else if (e.CommandName == "Zamitnout")
       {
           PaymentManager.RequestPayment(Id, false);
       }
       Page.DataBind();
       

       
    }
}
